﻿#region Copyright information
// 
// Copyright © 2005-2013 Yongkee Cho. All rights reserved.
// 
// This code is a part of the Biological Object Library and governed under the terms of the
// GNU Lesser General  Public License (LGPL) version 2.1 which accompanies this distribution.
// For more information on the LGPL, please visit http://bol.codeplex.com/license.
// 
// - Filename: Entry.cs
// - Author: Yongkee Cho
// - Email: yongkeecho@gmail.com
// - Date Created: 2013-01-25 3:25 PM
// - Last Modified: 2013-01-25 3:59 PM
// 
#endregion
using System;
using System.Collections.Generic;
using System.Linq;

namespace BOL.Models.MolecularInteractions
{
    public sealed class Entry
    {
        #region Public properties

        public string Source { get; private set; }
        public IEnumerable<IInteractor> Interactors { get; private set; }
        public IEnumerable<Interaction> Interactions { get; private set; }

        #endregion

        #region Constructors

        public Entry(string source, IEnumerable<IInteractor> interactors, IEnumerable<Interaction> interactions)
        {
            if (source == null)
                throw new ArgumentNullException("source");
            if (interactors == null)
                throw new ArgumentNullException("interactors");
            if (interactions == null)
                throw new ArgumentNullException("interactions");

            Source = source;
            Interactors = interactors;
            Interactions = interactions;
        }

        #endregion

        #region Object overriden

        public override string ToString()
        {
            return String.Format("Entry{{source='{0}', interactors='{1}', interactions='{2}'}}", Source, Interactors.Count(), Interactions.Count());
        }

        #endregion
    }
}
